package com.cr.service;

import java.util.List;

import com.cr.dao.OrderDetailDao;
import com.cr.model.OrderDetail;

public class OrderDetailService {
	private OrderDetailDao dao=new OrderDetailDao();
	
	/**
	 * @param id
	 * @return
	 */
	public OrderDetail getOrderDetail(long id)
	{
		return dao.getOrderDetail(id);
	}
	/**
	 * @param orderDetail
	 * @return
	 */
	public boolean addOrderDetail(OrderDetail orderDetail)
	{
		if(orderDetail==null)
			return false;
		return dao.addOrderDetail(orderDetail);
	}
	/**
	 * @param orderDetail
	 * @return
	 */
	public boolean updateOrderDetail(OrderDetail orderDetail)
	{
		if(orderDetail==null)
			return false;
		return dao.updateOrderDetail(orderDetail);
	}
	/**
	 * @param id
	 * @return
	 */
	public boolean deleteOrderDetail(long id)
	{
		return dao.deleteOrderDetail(id);
	}

	/**
	 * @param id
	 * @return
	 */
	public List<OrderDetail> getOrderDetails(long id)
	{
		return dao.getOrderDetails(id);
	}
}
